Skip to content

feat(app-host): load all kernel plugins to match studio configuration#1135

Merged
xuyushun441-sys merged 2 commits intomainfrom
claude/load-all-kernel-plugins
Apr 14, 2026
Merged

feat(app-host): load all kernel plugins to match studio configuration#1135
xuyushun441-sys merged 2 commits intomainfrom
claude/load-all-kernel-plugins

Conversation

@Claude
Copy link
Copy Markdown
Contributor

@Claude Claude AI commented Apr 14, 2026

app-host was missing several kernel plugins when deployed to Vercel, resulting in incomplete functionality compared to studio. This adds all kernel plugins that studio uses to ensure feature parity in production deployments.

Changes

  • Added missing plugin dependencies to package.json:

    • @objectstack/plugin-audit, @objectstack/plugin-security, @objectstack/plugin-setup
    • @objectstack/service-ai, @objectstack/service-analytics, @objectstack/service-automation, @objectstack/service-feed
  • Registered all kernel plugins in server/index.ts matching studio's configuration:

    • SetupPlugin (navigation service, loads before other plugins)
    • SecurityPlugin, AuditPlugin (RBAC, permissions, audit logging)
    • FeedServicePlugin, MetadataPlugin (activity feeds, metadata management)
    • AIServicePlugin, AutomationServicePlugin, AnalyticsServicePlugin
  • Added broker shim to bridge HttpDispatcher → ObjectQL engine:

    • Copied create-broker-shim.ts from studio
    • Attached before kernel.bootstrap() with post-bootstrap validation
    • Required for simplified kernel setup without full message broker
  • Reordered plugin loading for correct initialization:

    • Apps load first (provide object schemas)
    • SetupPlugin loads early (other plugins depend on navigation service)
    • Auth and service plugins follow
// Before: Only ObjectQLPlugin, DriverPlugin, AuthPlugin, and AppPlugins
await kernel.use(new ObjectQLPlugin());
await kernel.use(new DriverPlugin(tursoDriver));
await kernel.use(new AuthPlugin({ ... }));
await kernel.use(new AppPlugin(CrmApp));

// After: Full plugin stack matching studio
await kernel.use(new ObjectQLPlugin());
await kernel.use(new DriverPlugin(tursoDriver));
await kernel.use(new AppPlugin(CrmApp));
await kernel.use(new SetupPlugin());
await kernel.use(new AuthPlugin({ ... }));
await kernel.use(new SecurityPlugin());
await kernel.use(new AuditPlugin());
await kernel.use(new FeedServicePlugin());
await kernel.use(new MetadataPlugin({ watch: false }));
await kernel.use(new AIServicePlugin());
await kernel.use(new AutomationServicePlugin());
await kernel.use(new AnalyticsServicePlugin());
(kernel as any).broker = createBrokerShim(kernel);
await kernel.bootstrap();

app-host was missing several kernel plugins when deployed to Vercel,
causing incomplete functionality. This commit adds all the kernel
plugins that studio uses to ensure feature parity.

Changes:
- Added missing plugin dependencies to package.json:
  - @objectstack/plugin-audit
  - @objectstack/plugin-security
  - @objectstack/plugin-setup
  - @objectstack/service-ai
  - @objectstack/service-analytics
  - @objectstack/service-automation
  - @objectstack/service-feed

- Updated server/index.ts to register all kernel plugins:
  - SetupPlugin (loads before other plugins)
  - SecurityPlugin (RBAC and permissions)
  - AuditPlugin (audit logging)
  - FeedServicePlugin (activity feeds)
  - MetadataPlugin (metadata management)
  - AIServicePlugin (AI capabilities)
  - AutomationServicePlugin (flows and workflows)
  - AnalyticsServicePlugin (analytics)

- Added broker shim to bridge HttpDispatcher → ObjectQL engine
  - Copied create-broker-shim.ts from studio
  - Integrated broker shim before kernel bootstrap
  - Added broker validation after bootstrap

- Reordered plugin loading to match studio:
  - Apps load first (provide object schemas)
  - SetupPlugin loads early (navigation service)
  - Auth plugin loads after setup
  - Service plugins load after auth

This ensures app-host has the same capabilities as studio when
deployed to Vercel.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectstack-demo Ready Ready Preview, Comment Apr 14, 2026 7:33am
objectstack-play Ready Ready Preview, Comment Apr 14, 2026 7:33am
spec Ready Ready Preview, Comment Apr 14, 2026 7:33am

Request Review

@github-actions github-actions bot added size/m dependencies Pull requests that update a dependency file and removed size/m labels Apr 14, 2026
@xuyushun441-sys
Copy link
Copy Markdown
Contributor

@claude[agent]  ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with /examples/app-host/package.json

Update lockfile to include the new kernel plugin dependencies
added to examples/app-host/package.json in the previous commit.

This fixes the ERR_PNPM_OUTDATED_LOCKFILE error in CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
@Claude
Copy link
Copy Markdown
Contributor Author

Claude AI commented Apr 14, 2026

@claude[agent]  ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with /examples/app-host/package.json

Fixed in 62b3cc7. The lockfile has been updated to include the new kernel plugin dependencies added to app-host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants